package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallUtmStatis;
import com.appkubes.mall.core.po.MallUtmStatisExample;
import com.appkubes.mall.core.po.MallUtmStatisKey;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallUtmStatisMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_utm_statis
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUtmStatisSqlProvider.class, method="countByExample")
    long countByExample(MallUtmStatisExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_utm_statis
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallUtmStatisSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallUtmStatisExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_utm_statis
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_utm_statis",
        "where utm_key = #{utmKey,jdbcType=VARCHAR}",
          "and source_type = #{sourceType,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(MallUtmStatisKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_utm_statis
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_utm_statis (utm_key, source_type, ",
        "app_key, cpa, uv, ",
        "cps)",
        "values (#{utmKey,jdbcType=VARCHAR}, #{sourceType,jdbcType=VARCHAR}, ",
        "#{appKey,jdbcType=VARCHAR}, #{cpa,jdbcType=INTEGER}, #{uv,jdbcType=INTEGER}, ",
        "#{cps,jdbcType=INTEGER})"
    })
    int insert(MallUtmStatis record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_utm_statis
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallUtmStatisSqlProvider.class, method="insertSelective")
    int insertSelective(MallUtmStatis record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_utm_statis
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUtmStatisSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="utm_key", property="utmKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="source_type", property="sourceType", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="cpa", property="cpa", jdbcType=JdbcType.INTEGER),
        @Result(column="uv", property="uv", jdbcType=JdbcType.INTEGER),
        @Result(column="cps", property="cps", jdbcType=JdbcType.INTEGER)
    })
    List<MallUtmStatis> selectByExampleWithRowbounds(MallUtmStatisExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_utm_statis
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallUtmStatisSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="utm_key", property="utmKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="source_type", property="sourceType", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="cpa", property="cpa", jdbcType=JdbcType.INTEGER),
        @Result(column="uv", property="uv", jdbcType=JdbcType.INTEGER),
        @Result(column="cps", property="cps", jdbcType=JdbcType.INTEGER)
    })
    List<MallUtmStatis> selectByExample(MallUtmStatisExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_utm_statis
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "utm_key, source_type, app_key, cpa, uv, cps",
        "from mall_utm_statis",
        "where utm_key = #{utmKey,jdbcType=VARCHAR}",
          "and source_type = #{sourceType,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="utm_key", property="utmKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="source_type", property="sourceType", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="cpa", property="cpa", jdbcType=JdbcType.INTEGER),
        @Result(column="uv", property="uv", jdbcType=JdbcType.INTEGER),
        @Result(column="cps", property="cps", jdbcType=JdbcType.INTEGER)
    })
    MallUtmStatis selectByPrimaryKey(MallUtmStatisKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_utm_statis
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUtmStatisSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallUtmStatis record, @Param("example") MallUtmStatisExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_utm_statis
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUtmStatisSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallUtmStatis record, @Param("example") MallUtmStatisExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_utm_statis
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallUtmStatisSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallUtmStatis record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_utm_statis
     *
     * @mbg.generated
     */
    @Update({
        "update mall_utm_statis",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "cpa = #{cpa,jdbcType=INTEGER},",
          "uv = #{uv,jdbcType=INTEGER},",
          "cps = #{cps,jdbcType=INTEGER}",
        "where utm_key = #{utmKey,jdbcType=VARCHAR}",
          "and source_type = #{sourceType,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallUtmStatis record);
}